import request from '@/utils/request'

// 查询产品班组分摊分页信息
export const getTeamAllocationPageApi = (params) =>
  request.get('/ecm-microservice-biz/ecm/product/team/allocation/page', {
    params
  })

// 新增产品班组分摊
export const addTeamAllocationApi = (data) =>
  request.post('/ecm-microservice-biz/ecm/product/team/allocation/add', data)

// 修改产品班组分摊
export const updateTeamAllocationApi = (data) =>
  request.post('/ecm-microservice-biz/ecm/product/team/allocation/update', data)

// 删除产品班组分摊
export const deleteTeamAllocationApi = (id) =>
  request.post(
    '/ecm-microservice-biz/ecm/product/team/allocation/delete',
    null,
    { params: { id } }
  )

// 查询产品列表
export const getProductListApi = (params) =>
  request.get('/ecm-microservice-biz/ecm/product/team/allocation/pro/list', {
    params
  })

// 查询部门及班组列表
export const getDepartmentTeamListApi = (params) =>
  request.get('/ecm-microservice-biz/ecm/product/team/allocation/team/list', {
    params
  })
